package hu.diploma.web.server.restlet.resources;

import hu.diploma.common.resource.SmsMmsResource;
import hu.diploma.common.service.SmsMmsService;
import hu.diploma.common.vos.SmsMmsVo;
import hu.diploma.core.util.ServiceProviderImpl;

import java.util.ArrayList;

import org.restlet.resource.Put;
import org.restlet.resource.ServerResource;

public class SmsMmsResourceImpl extends ServerResource implements SmsMmsResource {
	SmsMmsService smsMmsService = ServiceProviderImpl.getServiceProvider().getSmsMmsService();

	@Put
	public void merge(ArrayList<SmsMmsVo> smsMmsVos) {
		for (SmsMmsVo smsMmsVo : smsMmsVos) {
			try {
				smsMmsService.save(smsMmsVo);
			} catch (Exception e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}

	}

}
